<div ng-controller="AuthorizationCtrl" ng-init="itemAction()">
    <ul class="sui-breadcrumb">
        <li><a href="#/authorization/list">{{'Authorization'| translate}}</a></li>
        <li class="active">
            {{"Item"|translate}}
        </li>
    </ul>
    <!-- <table class="sui-table table-bordered">
        <thead>
            <tr>
                <th ng-repeat="product in productAry"> {{product.name}}</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td ng-repeat="product in productAry">
                    <button class="sui-btn btn-success" ng-click="downloadItme(product.id)">商品下载</button>
                </td>
            </tr>
        </tbody>
    </table> -->
    <div class="sui-form form-horizontal">
        <div class="control-group">
            <label class="control-label v-top">授权产品:</label>
            <div class="controls">
                <label class="radio-pretty inline " ng-repeat="product in productAry">
                    <input type="radio" name="radio" ng-click="downloadItme(product.id,product.name)"><span>{{product.name}}</span>
                </label>
            </div>
        </div>

        <div ng-show="itemtype">
            <table class="sui-table table-bordered">
                <thead>
                    <tr>
                        <th colspan="4">{{itemName}}产品线   商品列表</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="item in itmeAry">
                        <td>
                        <img ng-src="{{item.image_url}}" width="100px" height="100px" >
                        </td>
                        <td>
                            {{item.outer_id}}
                        </td>
                        <td>
                            {{item.name}}
                        </td>
                        <td>
                             <itemvalidate ng-model="item.istype" pid="{{item.pid}}"></itemvalidate>
                            <button ng-show="!item.istype" class="sui-btn btn-primary" ng-click="useItem(item)">使用商品</button>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <!-- 分页start -->
    <!-- <pager page-no="1" page-size="pageSize" total="itemsTotal" get-data="getItemList(pageNo)"></pager> -->
    <!-- 分页end -->
</div>
